﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Jzy.BLL.Desktop;
using Jzy.Model.Desktop;

using Jzy.Core.Common.Web;
using Frame.Lib.Common;

namespace Jzy.Web.Desktop
{
    /// <summary>
    /// Save 的摘要说明
    /// </summary>
    public class Save : IHttpHandler, System.Web.SessionState.IReadOnlySessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            PageBase.CheckLogin();
            DesktopBO desktop = new DesktopBO();
            DesktopInfo info = new DesktopInfo();
            info.ID = AppSession.UserID;
            info.Modules = context.Request.Form["modules"];

            desktop.Save(info, false);

            context.Response.ContentType = "text/plain";
            context.Response.Write("ok");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}